<template>
  <div class="inputTxt">
    <div>文本：</div>
    <div>
      <el-input
        v-model="input"
        :placeholder="placeholder"
        @input="inputValChange"
        v-trim
      ></el-input>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    idx: {
      type: Number,
      default: 0,
    },
    inputVal: {
      type: String,
      default: "",
    },
    placeholder: {
      type: String,
      default: "请输入",
    },
    isremove: {
      type: Boolean,
      default: true,
    },
  },
  data() {
    return {
      input: this.inputVal,
    };
  },
  computed: {},
  watch: {
    inputVal() {
      this.input = this.inputVal;
    },
  },
  created() {},
  mounted() {},
  methods: {
    inputValChange(v) {
      this.$emit("input", this.idx, v);
    },
  },
};
</script>
<style lang="scss"></style>
